<template>
    <div>
        <MyHead :title="'设置'" :show="true"></MyHead>
          <van-cell-group>
               <van-cell  title="修改名字" is-link icon="search" />
               <van-cell  title="修改头像" is-link icon="search" />
            <van-cell title="我的收货地址"  is-link icon="search"  :to="{name:'addressedit'}" />
            <van-cell   title="账户与安全"    is-link icon="search" />
            <van-cell title="关于我们"  is-link icon="search" />
            
        </van-cell-group>
          <van-button v-if="appphone" class="logout-btn" @click="confirmLogou">退出登录</van-button>
    </div>
</template>

<script>
export default {
     methods:{
     
        confirmLogou(){
             Dialog.confirm({
                title: '退出提示',
                message: '你确定要退出当前?',
            })
            .then(() => {
                localStorage.removeItem("server_token") 
                       this.changeAppPhone(null)
                     this.$router.push({name:'login'})

            })
            .catch(() => {
                // on cancel
            });
        }
    }
}
</script>


<style lang="scss" scoped>
.logout-btn{
    width:100%;
    margin:10px auto;
}
</style>